home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 257 / SOMC Family Forum 257 - Disc 2.iso / somc / SNEAK.dir / 00001_Script_1 next >
Text File  |  1998-10-27  |  8KB  |  242 lines

  1.  
  2. on prepareMovie
  3.   global whichsneak -- THIS VARIBALE IS SET IN THE CALLING DIR
  4.   set whichsneak to "family"   
  5.   sneakswap(WHICHSNEAK)  
  6. end prepareMovie
  7.  
  8.  
  9.  
  10.  
  11.  
  12. on startMovie  
  13.   glowClear()  
  14. end
  15.  
  16.  
  17. on showpuppets TRUEFALSE
  18.   repeat with x = 2 to 6
  19.     set the visible of sprite x to TRUEFALSE
  20.   end repeat
  21. end
  22.  
  23.  
  24. on puppetsneaks sneakONOFF
  25.   repeat with x = 2 to 6
  26.     puppetSprite x,sneakONOFF
  27.   end repeat 
  28.   repeat with x = 52 to 56
  29.     puppetSprite x,sneakONOFF
  30.   end repeat 
  31. end
  32.  
  33. on sneakswap WHICHSNEAK
  34.   global FAMG,GAMEG,KIDSG,MACG,PRODG,EDUG
  35.   puppetsneaks (FALSE)
  36.   showpuppets (FALSE)
  37.   case WHICHSNEAK of
  38.     "EDU":
  39.       set the memberNum of sprite 2 to the memberNum of member "Snk FAM"
  40.       set FAMG to 52
  41.       set the memberNum of sprite 3 to the memberNum of member "Snk GAME"
  42.       set GAMEG to 53
  43.       set the memberNum of sprite 4 to the memberNum of member "Snk KIDS"
  44.       set KIDSG to 54
  45.       set the memberNum of sprite 5 to the memberNum of member "Snk MAC"
  46.       set MACG to 55
  47.       set the memberNum of sprite 6 to the memberNum of member "Snk PROD"
  48.       set PRODG to 56
  49.       
  50.       set the memberNum of sprite 52 to the memberNum of member "Snk FAMG"
  51.       set the memberNum of sprite 53 to the memberNum of member "Snk GAMEG"
  52.       set the memberNum of sprite 54 to the memberNum of member "Snk KIDSG"
  53.       set the memberNum of sprite 55 to the memberNum of member "Snk MACG"
  54.       set the memberNum of sprite 56 to the memberNum of member "Snk PRODG"
  55.       
  56.     "FAMILY":
  57.       set the memberNum of sprite 2 to the memberNum of member "Snk EDU"
  58.       set EDUG to 52
  59.       set the memberNum of sprite 3 to the memberNum of member "Snk GAME"
  60.       set GAMEG to 53
  61.       set the memberNum of sprite 4 to the memberNum of member "Snk KIDS"
  62.       set KIDSG to 54
  63.       set the memberNum of sprite 5 to the memberNum of member "Snk MAC"
  64.       set MACG to 55
  65.       set the memberNum of sprite 6 to the memberNum of member "Snk PROD" 
  66.       set PRODG to 56
  67.       
  68.       set the memberNum of sprite 52 to the memberNum of member "Snk EDUG"
  69.       set the memberNum of sprite 53 to the memberNum of member "Snk GAMEG"
  70.       set the memberNum of sprite 54 to the memberNum of member "Snk KIDSG"
  71.       set the memberNum of sprite 55 to the memberNum of member "Snk MACG"
  72.       set the memberNum of sprite 56 to the memberNum of member "Snk PRODG"
  73.       
  74.       
  75.     "GAME":
  76.       set the memberNum of sprite 2 to the memberNum of member "Snk EDU"
  77.       set EDUG to 52
  78.       set the memberNum of sprite 3 to the memberNum of member "Snk FAM"
  79.       set FAMG to 53
  80.       set the memberNum of sprite 4 to the memberNum of member "Snk KIDS"
  81.       set KIDSG to 54
  82.       set the memberNum of sprite 5 to the memberNum of member "Snk MAC"
  83.       set MACG to 55
  84.       set the memberNum of sprite 6 to the memberNum of member "Snk PROD" 
  85.       set PRODG to 56
  86.       
  87.       set the memberNum of sprite 52 to the memberNum of member "Snk eduG"
  88.       set the memberNum of sprite 53 to the memberNum of member "Snk FAMG"
  89.       set the memberNum of sprite 54 to the memberNum of member "Snk KIDSG"
  90.       set the memberNum of sprite 55 to the memberNum of member "Snk MACG"
  91.       set the memberNum of sprite 56 to the memberNum of member "Snk PRODG"
  92.       
  93.       
  94.       
  95.     "KIDS":
  96.       set the memberNum of sprite 2 to the memberNum of member "Snk EDU"
  97.       set EDUG to 52
  98.       set the memberNum of sprite 3 to the memberNum of member "Snk FAM"
  99.       set FAMG to 53
  100.       set the memberNum of sprite 4 to the memberNum of member "Snk GAME"
  101.       set GAMEG to 54
  102.       set the memberNum of sprite 5 to the memberNum of member "Snk MAC"
  103.       set MACG to 55
  104.       set the memberNum of sprite 6 to the memberNum of member "Snk PROD"  
  105.       set PRODG to 56
  106.       set the memberNum of sprite 52 to the memberNum of member "Snk EDUG"
  107.       set the memberNum of sprite 53 to the memberNum of member "Snk FAMG"
  108.       set the memberNum of sprite 54 to the memberNum of member "Snk GAMEG"
  109.       set the memberNum of sprite 55 to the memberNum of member "Snk MACG"
  110.       set the memberNum of sprite 56 to the memberNum of member "Snk PRODG"
  111.       
  112.       
  113.     "MAC":
  114.       set the memberNum of sprite 2 to the memberNum of member "Snk EDU"
  115.       
  116.       set the memberNum of sprite 3 to the memberNum of member "Snk FAM"
  117.       set FAMG to 53
  118.       set the memberNum of sprite 4 to the memberNum of member "Snk GAME"
  119.       set GAMEG to 54
  120.       set the memberNum of sprite 5 to the memberNum of member "Snk KIDS"
  121.       set KIDSG to 55
  122.       set the memberNum of sprite 6 to the memberNum of member "Snk PROD" 
  123.       set PRODG to 56
  124.       
  125.       set the memberNum of sprite 52 to the memberNum of member "Snk FAMG"
  126.       set the memberNum of sprite 53 to the memberNum of member "Snk FAMG"
  127.       set the memberNum of sprite 54 to the memberNum of member "Snk GAMEG"
  128.       set the memberNum of sprite 55 to the memberNum of member "Snk KIDSG"
  129.       set the memberNum of sprite 56 to the memberNum of member "Snk PRODG"
  130.       
  131.     "PROD":
  132.       set the memberNum of sprite 2 to the memberNum of member "Snk EDU"
  133.       set EDUG to 52
  134.       set the memberNum of sprite 3 to the memberNum of member "Snk FAM"
  135.       set FAMG to 53
  136.       set the memberNum of sprite 4 to the memberNum of member "Snk GAME"
  137.       set GAMEG to 54
  138.       set the memberNum of sprite 5 to the memberNum of member "Snk KIDS"
  139.       set KIDSG to 55
  140.       set the memberNum of sprite 6 to the memberNum of member "Snk MAC"
  141.       set MACG to 56
  142.       
  143.       set the memberNum of sprite 52 to the memberNum of member "Snk EDUG"
  144.       set the memberNum of sprite 53 to the memberNum of member "Snk FAMG"
  145.       set the memberNum of sprite 54 to the memberNum of member "Snk GAMEG"
  146.       set the memberNum of sprite 55 to the memberNum of member "Snk KIDSG"
  147.       set the memberNum of sprite 56 to the memberNum of member "Snk MACG"
  148.       
  149.       
  150.   end case
  151.   
  152.   puppetsneaks (TRUE)
  153.   UpdateStage
  154.   showpuppets (TRUE)
  155.   
  156. end
  157.  
  158.  
  159. --* This handler hides/shows the glow images. eg: glow(5,TRUE) *
  160.  
  161. on glow WHICHSPRITE, TRUEORFALSE
  162.   set the visible of sprite WHICHSPRITE to TRUEORFALSE
  163. end glow
  164.  
  165. --* TURN OF ALL GLOWS ON START
  166. on glowClear
  167.   repeat with i = 50 to 65
  168.     glow(i)
  169.   end repeat
  170. end
  171.  
  172. --* This handler switches the text color for a glow effect. eg.textglow("Hello",1)*
  173.  
  174. on textglow WHICHMEMBER, COLORNUMBER
  175.   set the foreColor of member WHICHMEMBER to COLORNUMBER  
  176. end textglow
  177.  
  178.  
  179. --* THIS HANDLER OPEN AND CENTERS A MOVIE IN A WINDOW *
  180.  
  181. on openMIAW MYWINDOW
  182.   set myRect=the rect of window MYWINDOW
  183.   set myStage=the rect of the Stage
  184.   set myWidth=(getAt(myRect,3)-getAt(myRect,1))
  185.   set myHeight=(getAt(myRect,4)-getAt(myRect,2))
  186.   set myLocH=((getAt(myStage,3)+getAt(myStage,1))/2)-(myWidth/2)
  187.   set myLocV=((getAt(myStage,2)+getAt(myStage,4))/2)-(myHeight/2)
  188.   set myNewRect=rect(myLocH,myLocV,(myLocH+myWidth),(myLocV+myHeight))
  189.   set the rect of window MYWINDOW=myNewRect
  190.   set the windowType of window MYWINDOW to 2
  191.   open window MYWINDOW
  192. end openMIAW
  193.  
  194.  
  195. --* THESE HANDLERS TURN ON A GLOW, TURN POINTER A HAND AND PLAYS A SOUND *
  196.  
  197. on doRollover numsprite,SOUNDNUM
  198.   glow(numsprite,TRUE)
  199.   global finger,fingermask
  200.   cursor[finger,fingermask]
  201.   updatestage  
  202.   case SOUNDNUM of
  203.     1:
  204.       puppetsound 1, "rollsound"
  205.       --  repeat while soundbusy(1)
  206.       --  end repeat
  207.     2:
  208.       puppetsound 1, "rollsound2"
  209.       --  repeat while soundbusy(1)
  210.       --  end repeat      
  211.   end case  
  212. end
  213.  
  214.  
  215.  
  216. --* THIS HANDLER TURNS THE SPRITE PASSED TO IT TO INVISIBLE AND RESETS THE CURSOR
  217.  
  218. on doRollout numsprite
  219.   glow(numsprite,FALSE)
  220.   cursor 0
  221. end
  222.  
  223. --* PLAYS A CLICK SOUND
  224.  
  225. on doClick
  226.   puppetsound 1,"clicksound"
  227.   updateStage
  228. end
  229.  
  230.  
  231.  
  232. -- Delays for x number of seconds
  233. on timedelay SECONDS 
  234.   startTimer
  235.   repeat while the timer < SECONDS * 60
  236.     nothing
  237.   end repeat    
  238. end
  239.  
  240.  
  241.  
  242.